﻿@model Romantics.Models.HikeViewModel
@section AddToHead{
    <link href="@Url.Content("~/Content/themes/simple/animate.css")" rel="stylesheet" type="text/css" />
}
@using Romantics
@{
    ViewBag.Title = Model.PhotoAlbum.Name;

    var Action = ((string)ViewContext.RouteData.Values["Action"]);
    var Controller = ((string)ViewContext.RouteData.Values["Controller"]);
}
@section RenderMeta{
    <meta name="description" content="@Model.Options.MetaDescription"/>
    <meta name="author" content="@Model.Options.Author"/>
    @{
        var meta = Model.PhotoAlbum.Meta ?? Model.Options.MetaKeywords;
        <meta name="keywords" content="@meta" />
    }
}
<div id="content">
    <div class="post">
        <div class="post-meta">
            <div class="row">
                <div class="post-title">
                    <h1>@Html.HikeLink(Model.PhotoAlbum.Hike)</h1>
                </div>
            </div>
            <div class="row">
                <div class="post-category">
                    <span>Катогория:&nbsp;</span>@Html.CategoryLink(Model.PhotoAlbum.Hike.Category, Controller)
                </div>
                <div class="post-category">
                    <span>Регион:&nbsp;</span>@Html.RegionLink(Model.PhotoAlbum.Hike.Region, Controller)
                </div>
            </div>
            <div class="row">
                <span>Маршрут:&nbsp;</span>@Html.Raw(Model.PhotoAlbum.Hike.Route)
            </div>
            <div class="mode">
                <span>Размер фотографий:&nbsp;</span>
                <span class="@(Model.Mode == "small" ? "active" : "")">@Html.ActionLink("Маленький", "PhotoAlbum", new { mode = "small", page = Model.CurrentPage }, new { title = "Маленький" })</span>
                <span class="@(Model.Mode == "medium" || Model.Mode == "" ? "active" : "")">@Html.ActionLink("Средний", "PhotoAlbum", new { mode = "medium", page = Model.CurrentPage }, new { title = "Средний" })</span>
                <span class="@(Model.Mode == "large" ? "active" : "")">@Html.ActionLink("Большой", "PhotoAlbum", new { mode = "large", page = Model.CurrentPage }, new { title = "Большой" })</span>
                <span class="@(Model.Mode == "xlarge" ? "active" : "")">@Html.ActionLink("Огромный", "PhotoAlbum", new { mode = "xlarge", page = Model.CurrentPage }, new { title = "Огромный" })</span>
                <span class="@(Model.Mode == "slideshow" ? "active" : "")">@Html.ActionLink("Слайд-шоу", "PhotoAlbum", new { mode = "slideshow", page = Model.CurrentPage }, new { title = "Слайд-шоу" })</span>
            </div>
            <div class="posted-date">
                @{
                    if (Model.PhotoAlbum.Hike.Duration > 1)
                    {
                    <span>С&nbsp;</span>@Model.PhotoAlbum.Hike.StartDate.ToString("d")<span>&nbsp;по&nbsp;</span>@Model.PhotoAlbum.Hike.EndDate.ToString("d")
                    }
                    else
                    {
                    @Model.PhotoAlbum.Hike.StartDate.ToString("d")
                    }
                }
            </div>
        </div>
        <div class="post-body">
            <div class="post-album slideshow previous">
                <a href="#" class="arrow previous"></a>
            </div>
            <div class="post-album slideshow">
                <div id="photos">
                    @{
                        var item = Model.PhotoAlbum.Items.OrderBy(i => i.ID).FirstOrDefault();
                        <div id="id1">
                            <img src ="@item.Large" border="0" />
                        </div>
                    }
                </div>
                <div id="photos_hidden">
                    @{
                        int id = 2;
                        foreach (var item1 in Model.PhotoAlbum.Items.OrderBy(i => i.ID).Skip(1))
                        {
                            <div id="id@(id)">
                                <img src ="@item1.Large" border="0" />
                            </div>
                            id++;
                        }
                    }
                </div>
            </div>
            <div class="post-album slideshow next">
                <a href="#" class="arrow next"></a>
            </div>
        </div>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script src="@Url.Content("~/Content/themes/simple/js/slideshow.js")"></script>
    </div>
</div>
